package com.time.sky.controller;

import com.time.sky.entity.Month;
import com.time.sky.mapper.MonthMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class MonthController {
    @Autowired
    MonthMapper monthMapper;

    @CrossOrigin
    @RequestMapping("/month/selectAll")
    public List<Month> findAll(){
        List<Month> all = monthMapper.findAll();
        return all;
    }
}
